package com.ruoyi.system.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.constant.Constants;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 老人跌倒记录表
 * @author jinyao
 */
@Data
@Table(name = "elderly_fall_record")
public class ElderlyFallRecord implements Serializable {
    /**
     * 记录ID
     */
    @Id
    @Column(name = "record_id")
    @GeneratedValue(generator = "JDBC",strategy = GenerationType.IDENTITY)
    private Long recordId;

    /**
     * 请求ID
     */
    @Column(name = "req_id")
    private String reqId;

    /**
     * 老人ID
     */
    @Column(name = "elderly_id")
    private Long elderlyId;

    /**
     * 老人姓名
     */
    @Column(name = "elderly_name")
    private String elderlyName;

    /**
     * 跌倒开始时间
     */
    @Column(name = "fall_start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date fallStartTime;

    /**
     * 跌倒结束时间
     */
    @Column(name = "fall_end_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date fallEndTime;

    /**
     * 跌倒类型（0正常跌倒 1剧烈跌倒 2滑倒 3摔倒）
     */
    @Column(name = "fall_type")
    private String fallType;

    /**
     * 严重程度（0轻微 1中等 2严重）
     */
    @Column(name = "severity_level")
    private String severityLevel;

    /**
     * 跌倒截图URL，多个用逗号分隔
     */
    @Column(name = "image_urls")
    private String imageUrls;

    /**
     * 告警状态（0未处理 1已通知 2已处理 3已忽略）
     */
    @Column(name = "alert_status")
    private String alertStatus;

    /**
     * 是否受伤（0否 1是）
     */
    @Column(name = "is_injury")
    private String isInjury;

    /**
     * 是否需要医疗处理（0否 1是）
     */
    @Column(name = "medical_treatment")
    private String medicalTreatment;

    /**
     * 状态（0正常 1停用）
     */
    @Column(name = "`status`")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @Column(name = "del_flag")
    private String delFlag;

    /**
     * 创建者
     */
    @Column(name = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新者
     */
    @Column(name = "update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;


    /**
     * 页数
     */
    @Transient
    private Integer pageNum = Constants.PAGE_NUM;

    /**
     * 页面数据条数
     */
    @Transient
    private Integer pageSize = Constants.PAGE_SIZE;

    /** 排序标识 */
    @Transient
    private String sort;

    /** 排序字段 */
    @Transient
    private String sortFiled;

    private static final long serialVersionUID = 1L;
}